import BaseModel = require('../BaseModel')

import ProductCategory = require('./ProductCategory')
import Repository = require('./Repository')

/**
 * 
 */
class Product extends BaseModel  {

    /**产品名称*/
    public name = ""
    /**产品编号(批发商自用编号)*/
    public product_code = ""
    /**封面图(缩略图)*/
    public cover_image = ""
    /**封面图(原图)*/
    public cover_image_src = ""
    /**条形码*/
    public barcode = ""
    /**基本单位*/
    public unit = ""
    /**辅助单位*/
    public assist_unit = ""
    /**规格*/
    public standard = ""
    /**型号*/
    public model = ""
    /**颜色*/
    public color = ""
    /**货位*/
    public place = ""
    /**售价*/
    public price = 0
    /**批发价*/
    public wholesale_price = 0
    /**特价*/
    public special_price = 0
    /**最终价格*/
    public final_price = 0
    /**订单子项产品的数量*/
    public quantity = 0
    /**成本(单件成本)*/
    public cost_price = 0
    /**库存*/
    public stock = 0
    /**备注*/
    public remark = ""
    /**加权平均成本*/
    public wac = 0
    /**临近提醒数*/
    public stock_remind = 0
    /**是否批发商自建产品*/
    public is_wholesaler_product = 0
    /**加入购物车时需要保存的库存点id*/
    public repository_id = 0
    /**上次入库的成本*/
    public latest_cost = 0
    /**上次入库的价格*/
    public latest_price = 0
    /**分类*/
    public category = new ProductCategory()
    /**产品所在的库存点列表*/
    public repositories = new Array<Repository>()
}
export = Product